import request from "../utils/reuqest.js"
//获取商品列表
export const api_goods = (data) => request.get("goods", data);
//添加
export const api_addgoods = (data) => request.post("goods", data);
//修改商品
export const api_goodsadd = (data) => request.put(`goods/${data.goods_id}`, data);
//删除商品
export const api_delete = (data) => request.delte(`goods/${data.id}`);

//分类参数列表
export const api_categories = (data) => request.get('categories', data);
//分类
export const api_attres = (data) => request.get(`categories/${data.id}/attributes`, data);
//添加
export const api_add = (data) => request.post(`categories/${data.id}/attributes`, data);
//编辑
export const api_uptpu = (data) => request.put(`categories/${data.id}/attributes/${data.attrId}`, data);
//删除分类参数
export const api_del_delete = (data) => request.delte(`categories/${data.id}/attributes/${data.attrid}`, data)
//删除分类
export const api_deltype = (data) => request.delte(`categories/${data}`, data);
//编辑分类
export const api_uptype = (data) => request.put(`categories/${data.id}`, data);
//添加分类
export const api_addtype = (data) => request.post("categories", data);
//搜索
export const api_search = (data) => request.get(`categories/${data.id}`, data);